home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / gas_251.zip / bin_251 / binutils / testsuite / binutils-all / objdump.exp < prev    next >
Text File  |  1994-09-29  |  2KB  |  59 lines

  1. #   Copyright (C) 1988, 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
  2.  
  3. # This program is free software; you can redistribute it and/or modify
  4. # it under the terms of the GNU General Public License as published by
  5. # the Free Software Foundation; either version 2 of the License, or
  6. # (at your option) any later version.
  7. # This program is distributed in the hope that it will be useful,
  8. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  10. # GNU General Public License for more details.
  11. # You should have received a copy of the GNU General Public License
  12. # along with this program; if not, write to the Free Software
  13. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  14.  
  15. # Please email any bugs, comments, and/or additions to this file to:
  16. # bug-dejagnu@prep.ai.mit.edu
  17.  
  18. # This file was written by Rob Savoye. (rob@cygnus.com)
  19.  
  20. load_lib util-defs.exp
  21. load_lib utils-lib.exp
  22.  
  23. # print the version number of objdump
  24. send_user "Version [binutil_version $OBJDUMP]"
  25. set test_code $objdir/$subdir/bintest
  26. set addr "\[0-9A-Fa-f\]+"
  27.  
  28. #
  29. # setup the list. Here the layout:
  30. # 1st field is the command line option.
  31. # 2nd field is the pattern to match. NOTE - No variable substitutions can be used!
  32. # 3rd field is an optional message to print with PASS/FAIL.
  33. #
  34. set utility [list { "" ".*Usage:.*objdump.*\-ahifdDr.*t.*xsl.*\-m machine.*\-j section[-_]name.*\.\.\." "No arguments" } \
  35.         { "-i" "BFD header file version.*srec.*header .* endian, data .* endian.*(m68k|i386|sparc|sh|z8k|h8|vax|tahoe|i960|i860|a29k|mips|we32k|romp|alliant|convex|m88k|pyramid|rs6000|hppa|alpha|arm)" "Show formats" } ]
  36.  
  37. foreach i $utility {
  38.     if [util_test "$OBJDUMP" "$OBJDUMPFLAGS [lindex $i 0]" $test_code [lindex $i 1] [lindex $i 2]] then {
  39.     fail "[lindex $i 2]"
  40.     } else {
  41.     pass "[lindex $i 2]"
  42.     }
  43.     # this is a hack. Since execing objdump with no errors produces a Tcl
  44.     # error, we need to reset so runtest.exp doesn't get confused.
  45.     if [string match "" [lindex $i 0]] then {
  46.     unset errorInfo
  47.     }
  48. }
  49. #
  50. # FIXME: lots more options to test...
  51. #
  52.  
  53.  
  54.  
  55.  
  56.  
  57.